<?php
/**
 * 
 * Partners of the mission display in a grid
 * 
 */

use Fox\Html\AnchorObject;
use Fox\Generator;

$missionid = Xview::instance()->val("missionid");

$block = new Fox\Html\Block("bRessources",Msg(Hive::BUNDLE,29));
$grid = new Fox\Grid("gRessources");
$grid->fieldcat(array("first_name","last_name","idele"));
//$grid->footer()->add(new Fox\Html\Button(array("add","addRessource")));
$grid->fieldcat()->switchToObjectMode();
$grid->setFieldAttr(array("first_name","last_name"),"SetAnchor",
					new AnchorObject("?mod=ressource&act=update",array(
					'ressource_id' => Fox\Generator::useAttribute())
				,"_blank"));	
$grid->fieldcat()->setGenerators(array(
	'idele' => Fox\Generator::ajaxReload(
					'docsWindow',
					Generator::url( "missions",
									"ressource",
									"remove",
									array("missionid" => $missionid,
									"ressource_id" => Fox\Generator::useAttribute("ressource_id")))
				)));
$block->add($grid);
return $block;
